package com.example.myshop.Dao;

import com.example.myshop.domain.CartDao;
import com.example.myshop.domain.OrderDao;
import com.example.myshop.entity.Cart;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest
@RunWith(SpringRunner.class)
public class cartdaotest {
    @Autowired
    private OrderDao orderDao;

    @Autowired
    private CartDao cartDao;

    @Test
    public void test1(){
        orderDao.findVOByOid(1L);

    }

    @Test
    public void test2(){
        Cart cart=new Cart();
        cart.setNum(1);
        cart.setUid(123L);
        cart.setPid(321L);
        cartDao.insert(cart);
    }
}
